<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.* "%>
<%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %>
<%@ page import="servlet.Connections" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Result</title>
</head>
<body>
<% 
   try{
	   Connections conn=new Connections();
       ResultSet rs=null;
       Statement stmt=null;
   	   String query;
       
   	   stmt=conn.getConnection().createStatement();
       query="select * from customerlead";
       rs=stmt.executeQuery(query);
%>
<center>
<table width=98% >
	<tr>
 	<%@include file="Menu.jsp" %>
 	</tr>
 </table>
 <table width=98% border=1 >
	 <tr>
	    <td><b>Name</b></td>
	    <td><b>Email</b></td>
	    <td><b>Phone1</b></td>
	    <td><b>Phone2</b></td>
	    <td><b>Address</b></td>
	    <td><b>Address1</b></td>
	    <td><b>State</b></td>
	    <td><b>city</b></td>
	    <td><b>Flat</b></td>
	    <td><b>Budget</b></td>
	    <td><b>Location</b></td>
	 </tr>
	<% while(rs.next()) { %>
	<tr>
		<td><%=rs.getString(1) %></td>
		<td><%=rs.getString(2) %></td>
		<td><%=rs.getString(3) %></td>
		<td><%=rs.getString(4) %></td>
		<td><%=rs.getString(5) %></td>
		<td><%=rs.getString(6) %></td>
		<td><%=rs.getString(7) %></td>
		<td><%=rs.getString(8) %></td>
		<td><%=rs.getString(9) %></td>
		<td><%=rs.getString(10) %></td>
		<td><%=rs.getString(11) %></td>
	</tr>
	  <%} %>
	  <tr>
	 </table>
	 
	 <form action="export_to_excel.jsp">
		<table width	=90% >
		<tr><td>
		<input type=submit value="Export to Excel"></input>
		</td></tr>
		</table>
		</form>
	
<%}
	catch(Exception e)
		{
			e.getStackTrace();
		}
		%>
		
		</center>
		
</body>
</html>